package com.cn.serverline.lineicp.workshopPlan.controller;

import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import com.cn.serverline.lineicp.workshopPlan.entity.WeekStageDaysHistory;
import com.cn.serverline.lineicp.workshopPlan.entity.request.WeekStageDaysHistoryRequest;
import com.cn.serverline.lineicp.workshopPlan.service.WeekStageDaysHistoryService;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 周计划下发历史 接口
 *
 * @author 田江余
 * @since 2024年8月7日
 */
@RestController
@ApiResource(name = "周计划下发历史的接口")
public class WeekStageDaysHistoryController {
    @Resource(name = "PlanWeekStageDaysHistoryServiceImpl")
    private WeekStageDaysHistoryService weekStageDaysHistoryService;

    /**
     * 分页查询-周计划下发历史列表
     */
    @GetResource(name = "分页查询-周计划下发历史列表", path = "/planWeekStageDaysHistory/page")
    public ResponseData<PageResult<WeekStageDaysHistory>> page(WeekStageDaysHistory weekStageDaysHistory) {
        return new SuccessResponseData<>(weekStageDaysHistoryService.findPage(weekStageDaysHistory));
    }

    /**
     * 周计划下发历史列表 时间查询
     */
    @GetResource(name = "周计划下发历史列表", path = "/planWeekStageDaysHistory/findList")
    public ResponseData<List<WeekStageDaysHistoryRequest>> findList(WeekStageDaysHistoryRequest weekStageDaysHistoryRequest) {
        return new SuccessResponseData<>(weekStageDaysHistoryService.findList(weekStageDaysHistoryRequest));
    }
}
